import {createRouter, createWebHistory} from 'vue-router'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/login',
            name: 'login',
            component: () => import('../views/LoginManage.vue')
        },
        {
            path: '/',
            name: 'home',
            component: () => import('../views/IndexPage.vue'),
            children: [
                {
                    path: '/dashboard',
                    name: 'dashboard',
                    component: () => import('../views/HomeDashboard.vue')
                },
                {
                    path: '/client',
                    name: 'client',
                    component: () => import('../views/ClientManage.vue')
                },
                {
                    path: '/subscribe',
                    name: 'subscribe',
                    component: () => import('../views/SubscribeManage.vue')
                },
                {
                    path: '/retain',
                    name: 'retain',
                    component: () => import('../views/RetainManage.vue')
                },
                {
                    path: '/user',
                    name: 'user',
                    component: () => import('../views/UserManage.vue')
                },
                {
                    path: '/acl',
                    name: 'acl',
                    component: () => import('../views/AclManage.vue')
                }
            ]
        }
    ]
})

export default router
